<template>
  <ul class="weui-rate">
    <li class="weui-rate-item" v-for="n in max" :key="n" :class="{'weui-rate-item-active' : n <= level}" :data-index='n'>
      <div class="weui-rate-item-def"></div>
    </li>
  </ul>
</template>

<script>
  export default {
    props: {
      level: {
        type: Number
      }
    },
    data () {
      return {
        max: [1, 2, 3, 4, 5]
      }
  }
  }
</script>

<style scoped>
  .swiper {
    height: 165px !important;
  }
  image {
    height: 100%;
    width: 100%;
  }
</style>
